3.1.32 \(\int \frac {1+(1+\sqrt {3}) x^4}{1-x^4+x^8} \, dx\) [32]

3.1.32.1 Optimal result
3.1.32.2 Mathematica [C] (verified)
3.1.32.3 Rubi [A] (verified)
3.1.32.4 Maple [C] (verified)
3.1.32.5 Fricas [A] (verification not implemented)
3.1.32.6 Sympy [F(-2)]
3.1.32.7 Maxima [F]
3.1.32.8 Giac [A] (verification not implemented)
3.1.32.9 Mupad [B] (verification not implemented)

3.1.32.1 Optimal result

Integrand size = 26, antiderivative size = 164 \[ \int \frac {1+\left (1+\sqrt {3}\right ) x^4}{1-x^4+x^8} \, dx=-\frac {1}{2} \sqrt {2+\sqrt {3}} \arctan \left (\frac {\sqrt {2+\sqrt {3}}-2 x}{\sqrt {2-\sqrt {3}}}\right )+\frac {1}{2} \sqrt {2+\sqrt {3}} \arctan \left (\frac {\sqrt {2+\sqrt {3}}+2 x}{\sqrt {2-\sqrt {3}}}\right )-\frac {1}{4} \sqrt {2+\sqrt {3}} \log \left (1-\sqrt {2-\sqrt {3}} x+x^2\right )+\frac {1}{4} \sqrt {2+\sqrt {3}} \log \left (1+\sqrt {2-\sqrt {3}} x+x^2\right ) \]

output
-1/2*arctan((-2*x+1/2*6^(1/2)+1/2*2^(1/2))/(1/2*6^(1/2)-1/2*2^(1/2)))*(1/2 
*6^(1/2)+1/2*2^(1/2))+1/2*arctan((2*x+1/2*6^(1/2)+1/2*2^(1/2))/(1/2*6^(1/2 
)-1/2*2^(1/2)))*(1/2*6^(1/2)+1/2*2^(1/2))-1/4*ln(1+x^2-x*(1/2*6^(1/2)-1/2* 
2^(1/2)))*(1/2*6^(1/2)+1/2*2^(1/2))+1/4*ln(1+x^2+x*(1/2*6^(1/2)-1/2*2^(1/2 
)))*(1/2*6^(1/2)+1/2*2^(1/2))
 
3.1.32.2 Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.

Time = 0.04 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.44 \[ \int \frac {1+\left (1+\sqrt {3}\right ) x^4}{1-x^4+x^8} \, dx=\frac {1}{4} \text {RootSum}\left [1-\text {$\#$1}^4+\text {$\#$1}^8\&,\frac {\log (x-\text {$\#$1})+\log (x-\text {$\#$1}) \text {$\#$1}^4+\sqrt {3} \log (x-\text {$\#$1}) \text {$\#$1}^4}{-\text {$\#$1}^3+2 \text {$\#$1}^7}\&\right ] \]

input
Integrate[(1 + (1 + Sqrt[3])*x^4)/(1 - x^4 + x^8),x]
 
output
RootSum[1 - #1^4 + #1^8 & , (Log[x - #1] + Log[x - #1]*#1^4 + Sqrt[3]*Log[ 
x - #1]*#1^4)/(-#1^3 + 2*#1^7) & ]/4
 
3.1.32.3 Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.09, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {1753, 27, 1475, 1083, 217, 1478, 25, 1103}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (1+\sqrt {3}\right ) x^4+1}{x^8-x^4+1} \, dx\)

\(\Big \downarrow \) 1753

\(\displaystyle \frac {\int \frac {\sqrt {3} \left (x^2+1\right )}{x^4-\sqrt {3} x^2+1}dx}{2 \sqrt {3}}+\frac {\int \frac {\sqrt {3} \left (1-x^2\right )}{x^4+\sqrt {3} x^2+1}dx}{2 \sqrt {3}}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{2} \int \frac {x^2+1}{x^4-\sqrt {3} x^2+1}dx+\frac {1}{2} \int \frac {1-x^2}{x^4+\sqrt {3} x^2+1}dx\)

\(\Big \downarrow \) 1475

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \int \frac {1}{x^2-\sqrt {2+\sqrt {3}} x+1}dx+\frac {1}{2} \int \frac {1}{x^2+\sqrt {2+\sqrt {3}} x+1}dx\right )+\frac {1}{2} \int \frac {1-x^2}{x^4+\sqrt {3} x^2+1}dx\)

\(\Big \downarrow \) 1083

\(\displaystyle \frac {1}{2} \int \frac {1-x^2}{x^4+\sqrt {3} x^2+1}dx+\frac {1}{2} \left (-\int \frac {1}{-\left (2 x-\sqrt {2+\sqrt {3}}\right )^2+\sqrt {3}-2}d\left (2 x-\sqrt {2+\sqrt {3}}\right )-\int \frac {1}{-\left (2 x+\sqrt {2+\sqrt {3}}\right )^2+\sqrt {3}-2}d\left (2 x+\sqrt {2+\sqrt {3}}\right )\right )\)

\(\Big \downarrow \) 217

\(\displaystyle \frac {1}{2} \int \frac {1-x^2}{x^4+\sqrt {3} x^2+1}dx+\frac {1}{2} \left (\frac {\arctan \left (\frac {2 x-\sqrt {2+\sqrt {3}}}{\sqrt {2-\sqrt {3}}}\right )}{\sqrt {2-\sqrt {3}}}+\frac {\arctan \left (\frac {2 x+\sqrt {2+\sqrt {3}}}{\sqrt {2-\sqrt {3}}}\right )}{\sqrt {2-\sqrt {3}}}\right )\)

\(\Big \downarrow \) 1478

\(\displaystyle \frac {1}{2} \left (-\frac {\int -\frac {\sqrt {2-\sqrt {3}}-2 x}{x^2-\sqrt {2-\sqrt {3}} x+1}dx}{2 \sqrt {2-\sqrt {3}}}-\frac {\int -\frac {2 x+\sqrt {2-\sqrt {3}}}{x^2+\sqrt {2-\sqrt {3}} x+1}dx}{2 \sqrt {2-\sqrt {3}}}\right )+\frac {1}{2} \left (\frac {\arctan \left (\frac {2 x-\sqrt {2+\sqrt {3}}}{\sqrt {2-\sqrt {3}}}\right )}{\sqrt {2-\sqrt {3}}}+\frac {\arctan \left (\frac {2 x+\sqrt {2+\sqrt {3}}}{\sqrt {2-\sqrt {3}}}\right )}{\sqrt {2-\sqrt {3}}}\right )\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{2} \left (\frac {\int \frac {\sqrt {2-\sqrt {3}}-2 x}{x^2-\sqrt {2-\sqrt {3}} x+1}dx}{2 \sqrt {2-\sqrt {3}}}+\frac {\int \frac {2 x+\sqrt {2-\sqrt {3}}}{x^2+\sqrt {2-\sqrt {3}} x+1}dx}{2 \sqrt {2-\sqrt {3}}}\right )+\frac {1}{2} \left (\frac {\arctan \left (\frac {2 x-\sqrt {2+\sqrt {3}}}{\sqrt {2-\sqrt {3}}}\right )}{\sqrt {2-\sqrt {3}}}+\frac {\arctan \left (\frac {2 x+\sqrt {2+\sqrt {3}}}{\sqrt {2-\sqrt {3}}}\right )}{\sqrt {2-\sqrt {3}}}\right )\)

\(\Big \downarrow \) 1103

\(\displaystyle \frac {1}{2} \left (\frac {\arctan \left (\frac {2 x-\sqrt {2+\sqrt {3}}}{\sqrt {2-\sqrt {3}}}\right )}{\sqrt {2-\sqrt {3}}}+\frac {\arctan \left (\frac {2 x+\sqrt {2+\sqrt {3}}}{\sqrt {2-\sqrt {3}}}\right )}{\sqrt {2-\sqrt {3}}}\right )+\frac {1}{2} \left (\frac {\log \left (x^2+\sqrt {2-\sqrt {3}} x+1\right )}{2 \sqrt {2-\sqrt {3}}}-\frac {\log \left (x^2-\sqrt {2-\sqrt {3}} x+1\right )}{2 \sqrt {2-\sqrt {3}}}\right )\)

input
Int[(1 + (1 + Sqrt[3])*x^4)/(1 - x^4 + x^8),x]
 
output
(ArcTan[(-Sqrt[2 + Sqrt[3]] + 2*x)/Sqrt[2 - Sqrt[3]]]/Sqrt[2 - Sqrt[3]] + 
ArcTan[(Sqrt[2 + Sqrt[3]] + 2*x)/Sqrt[2 - Sqrt[3]]]/Sqrt[2 - Sqrt[3]])/2 + 
 (-1/2*Log[1 - Sqrt[2 - Sqrt[3]]*x + x^2]/Sqrt[2 - Sqrt[3]] + Log[1 + Sqrt 
[2 - Sqrt[3]]*x + x^2]/(2*Sqrt[2 - Sqrt[3]]))/2
 

3.1.32.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 217
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( 
-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & 
& (LtQ[a, 0] || LtQ[b, 0])
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 1103
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, 
e}, x] && EqQ[2*c*d - b*e, 0]
 

rule 1475
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : 
> With[{q = Rt[2*(d/e) - b/c, 2]}, Simp[e/(2*c)   Int[1/Simp[d/e + q*x + x^ 
2, x], x], x] + Simp[e/(2*c)   Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; F 
reeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && 
 (GtQ[2*(d/e) - b/c, 0] || ( !LtQ[2*(d/e) - b/c, 0] && EqQ[d - e*Rt[a/c, 2] 
, 0]))
 

rule 1478
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : 
> With[{q = Rt[-2*(d/e) - b/c, 2]}, Simp[e/(2*c*q)   Int[(q - 2*x)/Simp[d/e 
 + q*x - x^2, x], x], x] + Simp[e/(2*c*q)   Int[(q + 2*x)/Simp[d/e - q*x - 
x^2, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ 
[c*d^2 - a*e^2, 0] &&  !GtQ[b^2 - 4*a*c, 0]
 

rule 1753
Int[((d_) + (e_.)*(x_)^(n_))/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x 
_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r = Rt[2*q - b/c, 2]}, Simp[1/(2*c 
*q*r)   Int[(d*r - (d - e*q)*x^(n/2))/(q - r*x^(n/2) + x^n), x], x] + Simp[ 
1/(2*c*q*r)   Int[(d*r + (d - e*q)*x^(n/2))/(q + r*x^(n/2) + x^n), x], x]]] 
 /; FreeQ[{a, b, c, d, e}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && NeQ 
[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[n/2, 0] && NegQ[b^2 - 4*a*c]
 
3.1.32.4 Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.21 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.38

method result size
default \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{8}-\textit {\_Z}^{4}+1\right )}{\sum }\frac {\left (2 \textit {\_R}^{4}+2 \sqrt {3}\, \textit {\_R}^{4}+\left (1+\sqrt {3}\right ) \left (\sqrt {3}-1\right )\right ) \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{7}-\textit {\_R}^{3}}\right )}{8}\) \(62\)

input
int((1+x^4*(1+3^(1/2)))/(x^8-x^4+1),x,method=_RETURNVERBOSE)
 
output
1/8*sum(1/(2*_R^7-_R^3)*(2*_R^4+2*3^(1/2)*_R^4+(1+3^(1/2))*(3^(1/2)-1))*ln 
(x-_R),_R=RootOf(_Z^8-_Z^4+1))
 
3.1.32.5 Fricas [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 158, normalized size of antiderivative = 0.96 \[ \int \frac {1+\left (1+\sqrt {3}\right ) x^4}{1-x^4+x^8} \, dx=-\frac {1}{2} \, \sqrt {\sqrt {3} + 2} \arctan \left (-{\left (x^{3} - \sqrt {3} x + x\right )} \sqrt {\sqrt {3} + 2}\right ) + \frac {1}{2} \, \sqrt {\sqrt {3} + 2} \arctan \left (x \sqrt {\sqrt {3} + 2}\right ) + \frac {1}{4} \, \sqrt {\sqrt {3} + 2} \log \left (\frac {x^{8} + 4 \, x^{6} + 5 \, x^{4} + 4 \, x^{2} - 2 \, \sqrt {3} {\left (x^{6} + 2 \, x^{4} + x^{2}\right )} + 2 \, {\left (2 \, x^{7} + 5 \, x^{5} + 5 \, x^{3} - \sqrt {3} {\left (x^{7} + 3 \, x^{5} + 3 \, x^{3} + x\right )} + 2 \, x\right )} \sqrt {\sqrt {3} + 2} + 1}{x^{8} - x^{4} + 1}\right ) \]

input
integrate((1+x^4*(1+3^(1/2)))/(x^8-x^4+1),x, algorithm="fricas")
 
output
-1/2*sqrt(sqrt(3) + 2)*arctan(-(x^3 - sqrt(3)*x + x)*sqrt(sqrt(3) + 2)) + 
1/2*sqrt(sqrt(3) + 2)*arctan(x*sqrt(sqrt(3) + 2)) + 1/4*sqrt(sqrt(3) + 2)* 
log((x^8 + 4*x^6 + 5*x^4 + 4*x^2 - 2*sqrt(3)*(x^6 + 2*x^4 + x^2) + 2*(2*x^ 
7 + 5*x^5 + 5*x^3 - sqrt(3)*(x^7 + 3*x^5 + 3*x^3 + x) + 2*x)*sqrt(sqrt(3) 
+ 2) + 1)/(x^8 - x^4 + 1))
 
3.1.32.6 Sympy [F(-2)]

Exception generated. \[ \int \frac {1+\left (1+\sqrt {3}\right ) x^4}{1-x^4+x^8} \, dx=\text {Exception raised: PolynomialError} \]

input
integrate((1+x**4*(1+3**(1/2)))/(x**8-x**4+1),x)
 
output
Exception raised: PolynomialError >> 1/(2394670008380375980290355982690325 
81075191976715165250684200040290318941159424*_t**88 + 13825633739587334576 
2803423705330731641326126160751478072830556473063127384064*sqrt(3)*_t**88 
- 5732624312622
 
3.1.32.7 Maxima [F]

\[ \int \frac {1+\left (1+\sqrt {3}\right ) x^4}{1-x^4+x^8} \, dx=\int { \frac {x^{4} {\left (\sqrt {3} + 1\right )} + 1}{x^{8} - x^{4} + 1} \,d x } \]

input
integrate((1+x^4*(1+3^(1/2)))/(x^8-x^4+1),x, algorithm="maxima")
 
output
integrate((x^4*(sqrt(3) + 1) + 1)/(x^8 - x^4 + 1), x)
 
3.1.32.8 Giac [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.75 \[ \int \frac {1+\left (1+\sqrt {3}\right ) x^4}{1-x^4+x^8} \, dx=\frac {1}{4} \, {\left (\sqrt {6} + \sqrt {2}\right )} \arctan \left (\frac {4 \, x + \sqrt {6} + \sqrt {2}}{\sqrt {6} - \sqrt {2}}\right ) + \frac {1}{4} \, {\left (\sqrt {6} + \sqrt {2}\right )} \arctan \left (\frac {4 \, x - \sqrt {6} - \sqrt {2}}{\sqrt {6} - \sqrt {2}}\right ) + \frac {1}{8} \, {\left (\sqrt {6} + \sqrt {2}\right )} \log \left (x^{2} + \frac {1}{2} \, x {\left (\sqrt {6} - \sqrt {2}\right )} + 1\right ) - \frac {1}{8} \, {\left (\sqrt {6} + \sqrt {2}\right )} \log \left (x^{2} - \frac {1}{2} \, x {\left (\sqrt {6} - \sqrt {2}\right )} + 1\right ) \]

input
integrate((1+x^4*(1+3^(1/2)))/(x^8-x^4+1),x, algorithm="giac")
 
output
1/4*(sqrt(6) + sqrt(2))*arctan((4*x + sqrt(6) + sqrt(2))/(sqrt(6) - sqrt(2 
))) + 1/4*(sqrt(6) + sqrt(2))*arctan((4*x - sqrt(6) - sqrt(2))/(sqrt(6) - 
sqrt(2))) + 1/8*(sqrt(6) + sqrt(2))*log(x^2 + 1/2*x*(sqrt(6) - sqrt(2)) + 
1) - 1/8*(sqrt(6) + sqrt(2))*log(x^2 - 1/2*x*(sqrt(6) - sqrt(2)) + 1)
 
3.1.32.9 Mupad [B] (verification not implemented)

Time = 8.70 (sec) , antiderivative size = 1, normalized size of antiderivative = 0.01 \[ \int \frac {1+\left (1+\sqrt {3}\right ) x^4}{1-x^4+x^8} \, dx=0 \]

input
int((x^4*(3^(1/2) + 1) + 1)/(x^8 - x^4 + 1),x)
 
output
0